﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class QuangcaoModel
    {
        public int Id { get; set; }
        public string Mota { get; set; }
        public string FileUrl { get; set; }
        public Nullable<bool> Type { get; set; }
        public Nullable<System.DateTime> Datecreate { get; set; }
        public Nullable<System.DateTime> DateEnd { get; set; }
        public string Postition { get; set; }
        public Nullable<bool> Status { get; set; }
        public string Url { get; set; }

        public static void MapFrom(QuangcaoModel model, ref Quangcao entity)
        {
            entity.Id = model.Id;
            entity.Mota = model.Mota;
            entity.FileUrl = model.FileUrl;
            entity.Type = model.Type;
            entity.Datecreate = model.Datecreate;
            entity.DateEnd = model.DateEnd;
            entity.Postition = model.Postition;
            entity.Status = model.Status;
            entity.Url = model.Url;

        }

        public static void MapFrom(Quangcao entity, ref QuangcaoModel model)
        {
            model.Id = entity.Id;
            model.Mota = entity.Mota;
            model.FileUrl = entity.FileUrl;
            model.Type = entity.Type;
            model.Datecreate = entity.Datecreate;
            model.DateEnd = entity.DateEnd;
            model.Postition = entity.Postition;
            model.Status = entity.Status;
            model.Url = entity.Url;

        }

    }
}